home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / rexx / rxcmanager.lha / rxcmanager / examples / CManager_URL.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1998-10-15  |  1.4 KB  |  67 lines

  1. /*
  2.     $VER: CManager_URL.rexx 1.0 (16.10.98) by Simone Tellini
  3. */
  4.  
  5.  
  6. options results                             /* enable return codes     */
  7.  
  8. if (left(address(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  9.  
  10.     address 'GOLDED.1'
  11.  
  12. 'LOCK CURRENT RELEASE=4'                    /* lock GUI, gain access   */
  13.  
  14. if (RC ~= 0) then
  15.  
  16.     exit
  17.  
  18. options failat 6                            /* ignore warnings         */
  19.  
  20. signal on syntax                            /* ensure clean exit       */
  21.  
  22. /* ---------------------- INSERT YOUR CODE HERE ---------------------- */
  23.  
  24. if ~show("L","rxcmanager.library") then
  25.     if ~addlib("rxcmanager.library",0,-30) then do
  26.         say "no rxcmanager.library"
  27.         exit
  28.     end
  29.  
  30. 'REQUEST STRING TITLE="Enter the pattern to search for:" VAR=K'
  31.  
  32. patt.Name    = k
  33. patt.WWW     = k
  34. patt.Comment = k
  35.  
  36. num = CMFind("USER WWW FTP","REC","PATT",1)
  37.  
  38. if num > 0 then do
  39.  
  40.     do i=0 to num-1
  41.  
  42.         if rec.i.Type = 'FTP' then do
  43.  
  44.             if rec.i.FTP ~= '' then
  45.                 'TEXT T="'rec.i.FTP'"'
  46.  
  47.         end
  48.         else if rec.i.WWW ~= '' then
  49.             'TEXT T="'rec.i.WWW'"'
  50.  
  51.         'CR'
  52.         'FIRST'
  53.     end
  54. end
  55.  
  56. /* ------------------------- END OF YOUR CODE ------------------------ */
  57.  
  58. 'UNLOCK'                                    /* unlock GUI              */
  59.  
  60. exit
  61.  
  62. SYNTAX:
  63.  
  64. SAY "Error in line" SIGL ":" ERRORTEXT(RC)
  65.  
  66. 'UNLOCK'
  67.